/**
 */
package fUML.Semantics.Activities.CompleteStructuredActivities.impl;

import fUML.Semantics.Activities.CompleteStructuredActivities.CompleteStructuredActivitiesPackage;
import fUML.Semantics.Activities.CompleteStructuredActivities.LoopNodeActivation;
import fUML.Semantics.Activities.CompleteStructuredActivities.Values;

import fUML.Syntax.Activities.IntermediateActivities.ActivityNode;

import java.util.Collection;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Loop Node Activation</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link fUML.Semantics.Activities.CompleteStructuredActivities.impl.LoopNodeActivationImpl#getBodyOutputLists <em>Body Output Lists</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class LoopNodeActivationImpl extends StructuredActivityNodeActivationImpl implements LoopNodeActivation {
	/**
	 * The cached value of the '{@link #getBodyOutputLists() <em>Body Output Lists</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBodyOutputLists()
	 * @generated
	 * @ordered
	 */
	protected EList<Values> bodyOutputLists;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected LoopNodeActivationImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return CompleteStructuredActivitiesPackage.Literals.LOOP_NODE_ACTIVATION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<Values> getBodyOutputLists() {
		if (bodyOutputLists == null) {
			bodyOutputLists = new EObjectContainmentEList<Values>(Values.class, this, CompleteStructuredActivitiesPackage.LOOP_NODE_ACTIVATION__BODY_OUTPUT_LISTS);
		}
		return bodyOutputLists;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean runTest() {
		// TODO: implement this method
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void runBody() {
		// TODO: implement this method
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void runLoopVariables() {
		// TODO: implement this method
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<ActivityNode> makeLoopVariableList() {
		// TODO: implement this method
		// Ensure that you remove @generated or mark it @generated NOT
		throw new UnsupportedOperationException();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case CompleteStructuredActivitiesPackage.LOOP_NODE_ACTIVATION__BODY_OUTPUT_LISTS:
				return ((InternalEList<?>)getBodyOutputLists()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CompleteStructuredActivitiesPackage.LOOP_NODE_ACTIVATION__BODY_OUTPUT_LISTS:
				return getBodyOutputLists();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CompleteStructuredActivitiesPackage.LOOP_NODE_ACTIVATION__BODY_OUTPUT_LISTS:
				getBodyOutputLists().clear();
				getBodyOutputLists().addAll((Collection<? extends Values>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case CompleteStructuredActivitiesPackage.LOOP_NODE_ACTIVATION__BODY_OUTPUT_LISTS:
				getBodyOutputLists().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CompleteStructuredActivitiesPackage.LOOP_NODE_ACTIVATION__BODY_OUTPUT_LISTS:
				return bodyOutputLists != null && !bodyOutputLists.isEmpty();
		}
		return super.eIsSet(featureID);
	}

} //LoopNodeActivationImpl
